<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>惊喜活动</title>
    <link rel="stylesheet" href="../../static/css/common/adaptor.css">
    <link rel="stylesheet" href="../../static/css/common/common.css">
    <link rel="stylesheet" href="../../static/css/activity/activityDetail.css">
</head>

<body>
    <div class="layout">
        <div class="activityBox">
            <!-- 动态渲染 -->
        </div>
        <div class="comments">
            <!-- 动态渲染 -->
        </div>
        <div class="loadingMarsk">
            <div class="loadingPic">
                <div class="rotatePic"><img src="../../static/img/1@3x.png" alt=""></div>
                <div class="centerPic"><img src="../../static/img/2@3x.png" alt=""></div>
            </div>
        </div>
        <div class="commentBoxMarsk">
            <div class="commentBox">
                <div class="textArea">
                    <textarea class="commentContant" placeholder="请输入留言(45字)" autofocus></textarea>
                </div>
                <div class="btn clearfix">
                    <div class="cancelBtn">取消</div>
                    <div class="submiteBtn">提交</div>
                </div>
            </div>
        </div>
        <div class="tips"></div>
    </div>
    <!-- 活动详情 -->
    <script type="text/template" id="activityBox">
        <div class="activityPic">
            <img src="{{activityDetail.pic}}" alt="">
        </div>
        <div class="activityTime">
            <div class="activityTime_c1"></div>
            <div class="activityTime_c2">限时限量 疯狂抢购</div>
            <div class="activityTime_c3">
                {{if activityDetail.valid===3&&activityDetail.second<0}}
                <div class="time">
                <span class="text">活动进行中</span>
                <span class="hour">00</span>
                <span class="timeIcon">:</span>
                <span class="minute">00</span>
                <span class="timeIcon">:</span>
                <span class="second">00</span>
                </div>
                {{/if}}
                {{if activityDetail.valid===2&&activityDetail.second>0}}
                <div class="time">
                    <span class="text">即将开场</span>
                    <span class="hour">00</span>
                    <span class="timeIcon">:</span>
                    <span class="minute">00</span>
                    <span class="timeIcon">:</span>
                    <span class="second">00</span>
                </div>
                {{/if}}
                {{if activityDetail.valid==4||activityDetail.secondMsg}}
                <span class="fuck">{{activityDetail.secondMsg}}</span> 
                {{/if}}
            </div>
        </div>
        <div class="productList">
            {{each activityDetail.list as item index}}
            <div class="productItem" data-id="{{item.id}}">
                <div class="productImg">
                    <img src="{{item.pic}}" alt="">
                </div>
                <div class="pMsg">
                    <h3>{{item.productName}}</h3>
                    <div class="price"><span>￥</span>{{item.price.toFixed(2)}}<span class="oldPrice">￥{{item.salesPrice}}</span></div>
                    <div class="leftProduct">剩余<span>{{item.inventory}}</span>件</div>
                    {{if item.status===1}}
                    <div class="btn"><button class="clickBtn has">马上抢</button></div>
                    {{/if}} {{if item.status===0}}
                    <div class="btn"><button class="clickBtn no">已抢光</button></div>
                    {{/if}}
                </div>
            </div>
            {{/each}}
            <div class="newOrder">
                <div class="newOrderIcon"></div>
                <div class="shellNum">{{activityDetail.salesCount}}件</div>
                <div class="orderList">
                    <div class="itemBox">
                        {{each activityDetail.salesInfo as item index}}
                        <div class="orderItem">{{item}}</div>
                        {{/each}}
                        <div>
                        </div>
                    </div>
                </div>
    </script>
    <!-- 活动评论 -->
    <script type="text/template" id="comments">
        <div class="msgAndComment">
            <div class="msgAndCommentImg"></div>
        </div>
        <div class="commentsContainer">
            {{each commentList as item index}}
            <div class="userComments">
                <div class="userCommentItem clearfix">
                    <div class="userHeader">
                        <img src="{{item.pic}}" alt="">
                    </div>
                    <div class="commentContainer">
                        <div class="usernameAndReply clearfix">
                            <div class="userName">
                                <span class="rName">{{item.nickname}}</span> {{if item.pNickname}}
                                <span class="replySomeone">回复</span><span class="replyName">{{item.pNickname}}</span> {{/if}}
                            </div>
                            <div class="reply">
                                <span class="replyBtn" data-id={{item.id}}>回复</span>
                            </div>
                        </div>
                        <div class="content">{{item.content}}</div>
                    </div>
                </div>
            </div>
            {{/each}} {{if acMore()===true}}
            <div class="moreComment">
                <div class="moreCommentsBtn">展开更多</div>
            </div>
            {{else if acMore()===false&&commentList.length!==0}}
            <div class="noComment">
                <div class="noCommentsBtn">没有更多评论了{{acMore()}}</div>
            </div>
            {{/if}} {{if commentList.length===0}}
            <div class="noComment">
                <div class="noCommentsBtn">暂无评论</div>
            </div>
            {{/if}}
            <div class="writeComent">我来说两句</div>
        </div>
    </script>
    <script src="../../static/assets/jquery/jquery.min.js"></script>
    <script src="../../static/assets/fastclick/fastclick.js"></script>
    <script src="../../static/assets/art-template/template.js"></script>
    <script src="../../static/js/config/tools.js"></script>
    <script src="../../static/js/config/config.js"></script>
    <script src="../../static/js/activity/activityDetail.js"></script>
</body>

</html>